﻿ USE [SQL2005_390264_devpoleposi]
GO
/****** Object:  Table [dbo].[tb_Asset_AudioData]    Script Date: 08/20/2007 08:09:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[tb_Asset_AudioData](
	[AudioId] [bigint] IDENTITY(1,1) NOT NULL,
	[CreatedOn] [datetime] NULL,
	[CreatedBy] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[AssetFk] [bigint] NULL,
	[ContentFormat] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[ContentStorageType] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[ContentBinary] [image] NULL,
	[ContentPath] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[AudioSourceModel] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[AudioSourceType] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[AudioSourceTime] [datetime] NULL,
	[Transcript] [varchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[Transcripted] [bit] NULL,
	[TranscriptedOn] [datetime] NULL,
	[TranscriptedBy] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[TranscriptApproved] [bit] NULL,
	[TranscriptApprovedOn] [datetime] NULL,
	[TranscriptApprovedBy] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
 CONSTRAINT [PK_tb_Pole_AudioData] PRIMARY KEY CLUSTERED 
(
	[AudioId] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Audio id' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_AudioData', @level2type=N'COLUMN', @level2name=N'AudioId'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Created on' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_AudioData', @level2type=N'COLUMN', @level2name=N'CreatedOn'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Created by' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_AudioData', @level2type=N'COLUMN', @level2name=N'CreatedBy'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Associated asset' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_AudioData', @level2type=N'COLUMN', @level2name=N'AssetFk'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Format of content' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_AudioData', @level2type=N'COLUMN', @level2name=N'ContentFormat'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Location of content' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_AudioData', @level2type=N'COLUMN', @level2name=N'ContentStorageType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Binary content (optional)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_AudioData', @level2type=N'COLUMN', @level2name=N'ContentBinary'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Path to content (optional)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_AudioData', @level2type=N'COLUMN', @level2name=N'ContentPath'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Model of Recording device' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_AudioData', @level2type=N'COLUMN', @level2name=N'AudioSourceModel'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Type of Recording device' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_AudioData', @level2type=N'COLUMN', @level2name=N'AudioSourceType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Time on Recording device' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_AudioData', @level2type=N'COLUMN', @level2name=N'AudioSourceTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Conted of transcript' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_AudioData', @level2type=N'COLUMN', @level2name=N'Transcript'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Transcripted (boolean)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_AudioData', @level2type=N'COLUMN', @level2name=N'Transcripted'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Time of Transcription' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_AudioData', @level2type=N'COLUMN', @level2name=N'TranscriptedOn'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Author of Transcription' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_AudioData', @level2type=N'COLUMN', @level2name=N'TranscriptedBy'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Transcript approved (boolean)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_AudioData', @level2type=N'COLUMN', @level2name=N'TranscriptApproved'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Transcript approved on' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_AudioData', @level2type=N'COLUMN', @level2name=N'TranscriptApprovedOn'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Transcript approved by' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_AudioData', @level2type=N'COLUMN', @level2name=N'TranscriptApprovedBy'

GO
/****** Object:  Table [dbo].[tb_Asset_ImageData]    Script Date: 08/20/2007 08:09:38 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[tb_Asset_ImageData](
	[ImageId] [bigint] IDENTITY(1,1) NOT NULL,
	[CreatedOn] [datetime] NULL,
	[CreatedBy] [datetime] NULL,
	[AssetFk] [bigint] NULL,
	[ContentFormat] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[ContentStorageType] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[ContentBinary] [image] NULL,
	[ContentPath] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[ImageSourceType] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[ImageSourceTime] [datetime] NULL,
	[ImageSourceModel] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[Longitude] [real] NULL,
	[Latitude] [real] NULL,
	[Altitude] [real] NULL,
	[Bearing] [real] NULL,
	[Pitch] [real] NULL,
	[Roll] [real] NULL,
	[Yaw] [real] NULL,
	[NoSatelites1] [smallint] NULL,
	[NoSatelites2] [smallint] NULL,
	[GpsSourceType] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[GpsSourceTime] [datetime] NULL,
	[GpsSourceModel] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
 CONSTRAINT [PK_tb_Pole_ImageData] PRIMARY KEY CLUSTERED 
(
	[ImageId] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Image id' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_ImageData', @level2type=N'COLUMN', @level2name=N'ImageId'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Created on' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_ImageData', @level2type=N'COLUMN', @level2name=N'CreatedOn'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Created by' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_ImageData', @level2type=N'COLUMN', @level2name=N'CreatedBy'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Associated asset' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_ImageData', @level2type=N'COLUMN', @level2name=N'AssetFk'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Format of content' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_ImageData', @level2type=N'COLUMN', @level2name=N'ContentFormat'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Location of content' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_ImageData', @level2type=N'COLUMN', @level2name=N'ContentStorageType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Binary content (optional)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_ImageData', @level2type=N'COLUMN', @level2name=N'ContentBinary'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Path to content (optional)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_ImageData', @level2type=N'COLUMN', @level2name=N'ContentPath'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Type of Camera device' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_ImageData', @level2type=N'COLUMN', @level2name=N'ImageSourceType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Time on Camera device' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_ImageData', @level2type=N'COLUMN', @level2name=N'ImageSourceTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Model of Camera device' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_ImageData', @level2type=N'COLUMN', @level2name=N'ImageSourceModel'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Variance from Greenwich' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_ImageData', @level2type=N'COLUMN', @level2name=N'Longitude'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Variance from Equator' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_ImageData', @level2type=N'COLUMN', @level2name=N'Latitude'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Variance from Sea Level' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_ImageData', @level2type=N'COLUMN', @level2name=N'Altitude'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Variance from Magnetic North' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_ImageData', @level2type=N'COLUMN', @level2name=N'Bearing'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Variance Up and Down' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_ImageData', @level2type=N'COLUMN', @level2name=N'Pitch'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Variance  from Horizon' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_ImageData', @level2type=N'COLUMN', @level2name=N'Roll'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Variance Left and Right' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_ImageData', @level2type=N'COLUMN', @level2name=N'Yaw'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Number of Satelites' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_ImageData', @level2type=N'COLUMN', @level2name=N'NoSatelites1'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Number of Satelites' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_ImageData', @level2type=N'COLUMN', @level2name=N'NoSatelites2'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Type of GPS device' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_ImageData', @level2type=N'COLUMN', @level2name=N'GpsSourceType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Time on GPS device' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_ImageData', @level2type=N'COLUMN', @level2name=N'GpsSourceTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Model of GPS device' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_ImageData', @level2type=N'COLUMN', @level2name=N'GpsSourceModel'

GO
/****** Object:  Table [dbo].[tb_Asset_LocationData]    Script Date: 08/20/2007 08:09:38 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[tb_Asset_LocationData](
	[LocationId] [bigint] IDENTITY(1,1) NOT NULL,
	[LocationGuid] [uniqueidentifier] NULL,
	[CreatedOn] [datetime] NULL,
	[CreatedBy] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[AssetFk] [bigint] NULL,
	[Longitude] [real] NULL,
	[Latitude] [real] NULL,
	[Altitude] [real] NULL,
	[Bearing] [real] NULL,
	[Pitch] [real] NULL,
	[Roll] [real] NULL,
	[Yaw] [real] NULL,
	[NoSatelites2] [tinyint] NULL,
	[NoSatelites1] [tinyint] NULL,
	[PDOP] [tinyint] NULL,
	[GDOP] [tinyint] NULL,
	[GpsSourceType] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[GpsSourceTime] [datetime] NULL,
	[GpsSourceModel] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
 CONSTRAINT [PK_tb_Pole_LocationData] PRIMARY KEY CLUSTERED 
(
	[LocationId] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Generated Centrally' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_LocationData', @level2type=N'COLUMN', @level2name=N'LocationId'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Generated Remotely' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_LocationData', @level2type=N'COLUMN', @level2name=N'LocationGuid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Created on' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_LocationData', @level2type=N'COLUMN', @level2name=N'CreatedOn'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Created by' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_LocationData', @level2type=N'COLUMN', @level2name=N'CreatedBy'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Associated asset' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_LocationData', @level2type=N'COLUMN', @level2name=N'AssetFk'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Variance from Greenwich' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_LocationData', @level2type=N'COLUMN', @level2name=N'Longitude'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Variance from Equator' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_LocationData', @level2type=N'COLUMN', @level2name=N'Latitude'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Variance from Sea Level' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_LocationData', @level2type=N'COLUMN', @level2name=N'Altitude'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Variance from Magnetic North' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_LocationData', @level2type=N'COLUMN', @level2name=N'Bearing'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Variance Up and Down' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_LocationData', @level2type=N'COLUMN', @level2name=N'Pitch'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Variance  from Horizon' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_LocationData', @level2type=N'COLUMN', @level2name=N'Roll'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Variance Left and Right' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_LocationData', @level2type=N'COLUMN', @level2name=N'Yaw'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Number of Satelites' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_LocationData', @level2type=N'COLUMN', @level2name=N'NoSatelites2'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Number of Satelites' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_LocationData', @level2type=N'COLUMN', @level2name=N'NoSatelites1'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Percent Dilution of Position' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_LocationData', @level2type=N'COLUMN', @level2name=N'PDOP'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'The multiplicative factor that modifies range error' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_LocationData', @level2type=N'COLUMN', @level2name=N'GDOP'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Type of GPS device' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_LocationData', @level2type=N'COLUMN', @level2name=N'GpsSourceType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Time on GPS device' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_LocationData', @level2type=N'COLUMN', @level2name=N'GpsSourceTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Model of GPS device' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Asset_LocationData', @level2type=N'COLUMN', @level2name=N'GpsSourceModel'

GO
/****** Object:  Table [dbo].[tb_Asset_Types]    Script Date: 08/20/2007 08:09:38 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[tb_Asset_Types](
	[TypeId] [int] NULL,
	[Name] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[Description] [varchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[tb_Assets]    Script Date: 08/20/2007 08:09:38 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[tb_Assets](
	[AssetId] [bigint] NOT NULL,
	[AssetGuid] [uniqueidentifier] NULL,
	[CreatedOn] [datetime] NULL,
	[CreatedBy] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[UpdatedOn] [datetime] NULL,
	[UpdatedBy] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[UpdatedReason] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[RusId] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[PpiId] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[PreferedLocationFk] [bigint] NULL,
	[PreferedOn] [datetime] NULL,
	[PreferedBy] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[AssetType] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
 CONSTRAINT [PK_tb_Assets] PRIMARY KEY CLUSTERED 
(
	[AssetId] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Generated Centrally' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Assets', @level2type=N'COLUMN', @level2name=N'AssetId'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Generated Remotely' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Assets', @level2type=N'COLUMN', @level2name=N'AssetGuid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Created on' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Assets', @level2type=N'COLUMN', @level2name=N'CreatedOn'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Created by' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Assets', @level2type=N'COLUMN', @level2name=N'CreatedBy'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Updated on' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Assets', @level2type=N'COLUMN', @level2name=N'UpdatedOn'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Updated by' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Assets', @level2type=N'COLUMN', @level2name=N'UpdatedBy'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Updated reason' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Assets', @level2type=N'COLUMN', @level2name=N'UpdatedReason'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'RUS id' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Assets', @level2type=N'COLUMN', @level2name=N'RusId'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'PPI' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Assets', @level2type=N'COLUMN', @level2name=N'PpiId'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Prefered location' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Assets', @level2type=N'COLUMN', @level2name=N'PreferedLocationFk'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Prefered location selected on' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Assets', @level2type=N'COLUMN', @level2name=N'PreferedOn'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Prefered location selected by' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Assets', @level2type=N'COLUMN', @level2name=N'PreferedBy'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Asset type description' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Assets', @level2type=N'COLUMN', @level2name=N'AssetType'

GO
/****** Object:  Table [dbo].[tb_OverlayMaps]    Script Date: 08/20/2007 08:09:38 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[tb_OverlayMaps](
	[OverlayId] [bigint] NOT NULL,
	[CreatedOn] [datetime] NULL,
	[CreatedBy] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[UpdatedOn] [datetime] NULL,
	[UpdatedBy] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[UpdatedReason] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[Name] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[Type] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[Description] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[UncPath] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
 CONSTRAINT [PK_tb_OverlayMaps] PRIMARY KEY CLUSTERED 
(
	[OverlayId] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Overlay Id' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_OverlayMaps', @level2type=N'COLUMN', @level2name=N'OverlayId'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Created on' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_OverlayMaps', @level2type=N'COLUMN', @level2name=N'CreatedOn'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Created by' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_OverlayMaps', @level2type=N'COLUMN', @level2name=N'CreatedBy'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Updated on' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_OverlayMaps', @level2type=N'COLUMN', @level2name=N'UpdatedOn'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Updated by' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_OverlayMaps', @level2type=N'COLUMN', @level2name=N'UpdatedBy'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Updated reason' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_OverlayMaps', @level2type=N'COLUMN', @level2name=N'UpdatedReason'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Title of image' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_OverlayMaps', @level2type=N'COLUMN', @level2name=N'Name'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Subgroup of image' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_OverlayMaps', @level2type=N'COLUMN', @level2name=N'Type'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'A description of the image' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_OverlayMaps', @level2type=N'COLUMN', @level2name=N'Description'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'File location of image' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_OverlayMaps', @level2type=N'COLUMN', @level2name=N'UncPath'

GO
/****** Object:  Table [dbo].[tb_Polygons]    Script Date: 08/20/2007 08:09:38 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[tb_Polygons](
	[PolygonId] [bigint] NOT NULL,
	[CreatedOn] [datetime] NULL,
	[CreatedBy] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[UpdatedOn] [datetime] NULL,
	[UpdatedBy] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[UpdatedReason] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[Name] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[Type] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[Points] [varchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[LineRgb] [smallint] NULL,
	[LineWidth] [smallint] NULL,
	[FillRgb] [smallint] NULL,
	[FillOpacity] [smallint] NULL,
	[Description] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Polygon Id' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Polygons', @level2type=N'COLUMN', @level2name=N'PolygonId'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Created on' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Polygons', @level2type=N'COLUMN', @level2name=N'CreatedOn'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Created by' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Polygons', @level2type=N'COLUMN', @level2name=N'CreatedBy'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Updated on' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Polygons', @level2type=N'COLUMN', @level2name=N'UpdatedOn'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Updated by' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Polygons', @level2type=N'COLUMN', @level2name=N'UpdatedBy'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Updated reason' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Polygons', @level2type=N'COLUMN', @level2name=N'UpdatedReason'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Title of polygon' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Polygons', @level2type=N'COLUMN', @level2name=N'Name'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Subgroup of polygon' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Polygons', @level2type=N'COLUMN', @level2name=N'Type'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Outline of polygon' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Polygons', @level2type=N'COLUMN', @level2name=N'Points'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Color of line' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Polygons', @level2type=N'COLUMN', @level2name=N'LineRgb'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Width of line' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Polygons', @level2type=N'COLUMN', @level2name=N'LineWidth'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Collor of fill' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Polygons', @level2type=N'COLUMN', @level2name=N'FillRgb'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'0 is fully opaque, 100 is transparent' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Polygons', @level2type=N'COLUMN', @level2name=N'FillOpacity'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'A description of the polygon' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'tb_Polygons', @level2type=N'COLUMN', @level2name=N'Description'
